package x.y.z;

import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.Test;

import java.io.IOException;

public class Jackson1 {
    @Test
    public void test() throws IOException {
        String json = "{\"code\": \"1\",\"name\": \"2\", \"children\": [{\"code\": \"g1\",\"name\": \"c2\"}]}";
        ObjectMapper mapper = new ObjectMapper();
        Dept dept = mapper.readValue(json,Dept.class);
    }
}
